//
//  CAnAlgSwimLapData.h
//  sr01sdkProject
//
//  Created by  on 2024/9/3.
//  Swimming workout lap data (游泳锻炼单圈数据)

#import <Foundation/Foundation.h>
#import "CANalgProtocal.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(uint8_t, NALG_SWIM_TYPE) {
    NALG_SWIM_UKNOW = 0,
    NALG_SWIM_CRAWLING = 1, // 爬泳
    NALG_SWIM_BREASTSTROKE = 2, // 蛙泳
    NALG_SWIM_BACKSTROKE = 3, //仰泳
    NALG_SWIM_BUTTERFLY = 4, // 蝶泳
};


@interface CAnAlgSwimLapData : NSObject<CANalgProtocal>

@property(assign, nonatomic, readonly)uint8_t cmdByte;

@property(assign, nonatomic, readonly)NSUInteger timeStamp;// Timestamp, accurate to day

@property(assign, nonatomic, readonly)uint16_t strokes; //Number of strokes per lap(单圈划水次数)
@property(assign, nonatomic, readonly)uint16_t lapSwimDuration;//Lap swimming time(单圈游泳时间), Unit: s, range: 0-65535
@property(assign, nonatomic, readonly)uint8_t strokeRate;//The stroke rate per lap(每圈的划水速率), unit: strokes/min, range 0-180
@property(assign, nonatomic, readonly)NALG_SWIM_TYPE swimStylePerLap;
@property(assign, nonatomic, readonly)uint16_t lapSwimPace;// Single lap swimming pace, unit: min/Km*10(单圈游泳配速，单位 min/Km*10)
@property(assign, nonatomic, readonly)uint16_t  swolf;// The sum of the lap time (in seconds) and the number of strokes per lap. (游泳效率)
@property(assign, nonatomic, readonly)uint8_t lapDetectionStatus; // Swimming lap detection.(游泳圈数检测)
@property(assign, nonatomic, readonly)uint8_t lapDistance; //单圈距离

- (instancetype)initWithData:(NSData *)data;
-(NSNumber *)dataTimeStamp;
@end

NS_ASSUME_NONNULL_END
